<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<title></title> 
<%@include file="../../commons/_meta.jsp"%>
<base href="${ctx}">  
<meta charset="utf-8"> 
<link rel="stylesheet" href="${ctx}assets/plugins/pure/pure-min.css" media="all" />
<script type="text/javascript">
debugs("${ctx} --- user-view.jsp");
function validateForm(){
    if(empty($("#username").val())){
    	alertError('<fmt:message key="Please.enter.your.user.name"/>');
		return false;
    }
    if(empty($("#status").val())){
    	alertError('<fmt:message key="Please.select.a.user.state"/>');
		return false;
    }

    $("#forms").submit();   
}

function chooseparent(title,url,id,w,h){
	layer_show(title,url,w,h);
}

jQuery(document).ready(function() { 
	$("#back_btn").click(function() {
		//$(form).ajaxSubmit();
		var index = parent.layer.getFrameIndex(window.name);
		debugs("parentpage listForm");
		parent.listFormPageSearch(1);
		debugs("parentpage listForm Done");
		parent.layer.close(index);
	});
}); 
</script> 
</head>
<body >
<form class="pure-form pure-form-aligned" id="forms" method="post" action="${ctx}admin/adminuser/save">
    <fieldset>
        <fieldset> 
        <div class="pure-control-group">
            <label for="username"><fmt:message key='Login.name'/>:<span class="error">*</span></label> 
            <input id="username" name="username" type="text" readonly="readonly" value="${obj.username }" />
        </div> 
        <div class="pure-control-group">
            <label for="email"><fmt:message key='email'/>:</label> 
            <input id="email" name="email" type="text" readonly="readonly"  placeholder="" value="${obj.email }" />
        </div>
        <div class="pure-control-group">
            <label for="mobile"><fmt:message key='Mobile.phone'/>:</label> 
            <input id="mobile" name="mobile" type="text"  readonly="readonly" placeholder="" value="${obj.mobile }" />
        </div>
        <div class="pure-control-group">
	        <label for="status"><fmt:message key='status'/></label>
	        <select id="status" name="status" disabled="disabled" style="text-align: center;"> 
				<option value="0" <c:if test="${obj.status == 0 }">selected="selected"</c:if> ><fmt:message key='disable'/></option>
				<option value="1" <c:if test="${obj.status == 1 }">selected="selected"</c:if> ><fmt:message key='available'/></option>
				<%-- <option value="-1" <c:if test="${obj.status == -1 }">selected="selected"</c:if> >删除</option> --%>
			</select> 
        </div>
    </fieldset>
</form>

	<!-- 页尾，提示消息 -->
	<jsp:include page="../../commons/_foot_message.jsp"></jsp:include> 
	
	<script>
		jQuery(document).ready(function() {
			var webStatust = $("#webStatus").html();
			if(empty(webStatust)){
				return ;
			}else if(webStatust == 200) {
				parent.listFormPageSearch(1);
			}
		});
	</script> 
</body>
</html>